#pragma once
#include "tester.h"

#define CM_LUN 0
#define REQ_DATA_SIZE 7
//typedef int (*CrbNotifyFun)(void* pRequester, void* pCrb, uint8 State);
typedef struct _tagReqData
{
	uint8 	m_cmd;
	uint8  	m_rsNetFn; 	
	uint8 	m_len;
	uint8	m_buff[REQ_DATA_SIZE];

	uint8  	m_reSendCounter:4;		
	uint8  	m_rsLun:2;		
	uint8  	m_rqLun:2;
	CrbNotifyFun	Notify;			
}ReqData;
void ReqData_Init(ReqData* pReqData, uint8 cmd, uint8 netFn, uint8 len, uint8 data[]);

class CCmTester :
	public CTester
{
public:
	CCmTester(void);
	~CCmTester(void);

	CWinThread*	m_TimerThread;
	CWinThread*	m_CmThread;
	CWinThread*	m_HwThread;

	static UINT TimerRun(LPVOID pVoid);
	static UINT CmRun(CCmTester* pCmTester);
	static UINT HardwareRun(LPVOID pVoid);
};

void CmTester_Cmd(IpmiCmdItem* pItem);
void CmTester_Led(IpmiCmdItem* pItem);
